Skip to content

Fix/allow_registration_without_email_confirmation#103

Draft
gkijko wants to merge 11 commits into
mainfrom
fix/simple_fix
Draft

Fix/allow_registration_without_email_confirmation#103
gkijko wants to merge 11 commits into
mainfrom
fix/simple_fix

Conversation

@gkijko
Copy link
Copy Markdown

@gkijko gkijko commented Aug 13, 2019

No description provided.

Éric Araujo and others added 11 commits February 27, 2019 22:28
Signed-off-by: dependabot[bot] <support@dependabot.com>

Signed-off-by: dependabot[bot] <support@github.com>
Currently if the setting REST_AUTH_TOOLKIT['email_confirmation_send_email'] is set to false, the registration view still requires an email_confirmation_class and it also skips the confirmation email (that is correct) but it does not set the user as active.

This first change enables the automatic activation of users if the email_confirmation_send_email settings is set to false.
@gkijko gkijko requested a review from merwok August 13, 2019 16:56
@@ -51,12 +51,15 @@ def post(self, request):
user = deserializer.save()

if self.email_confirmation_class is None:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think line 53 to 56 should go after the if get_setting('email_confirmation_send_email', True):
That way there would be no need to define the email_confirmation_class if the email_confirmation_send_email is set to False.

Other option would be to let is as is and let the programer decide how he wants to validate the emails.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea was that you always want a record in your DB (using your email confirmation class), but not always want to send actual email messages.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem is known #38 and has a PR #44

send_email(request, user, getattr(user, email_field), confirmation)
else:
user.is_active = True
user.save()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn’t be right for this class, but see the RestAuthToolkitMinimal app config class that doesn’t do user activation.

@merwok merwok changed the base branch from develop to master December 3, 2020 03:00
@merwok merwok changed the base branch from master to main December 8, 2020 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants